RtAllocateLockedMemory

RtAllocateLockedMemory commits and locks the specified amount of memory to avoid page faults as the memory is used.

Syntax

PVOID RtAllocateLockedMemory(
    UINT nNumberOfBytes
);

Parameters

nNumberOfBytes

An unsigned integer specifying the number of bytes to allocate, commit, and lock.

Return Values

A pointer to the allocated memory if the function succeeds, a NULL pointer if the function fails

Remarks

RtAllocateLockedMemory allocates memory in the virtual address space of the process, commits that space to physical memory, and locks that physical memory. The committed locked memory will not incur page faults when the memory is used, nor will the system page the allocated memory out to secondary storage.

Requirements

Header Rtapi.h
Library rtapi_w32.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtCommitLockHeap

RtCommitLockProcessHeap

RtCommitLockStack

RtFreeLockedMemory

RtLockKernel

RtLockProcess

RtUnlockKernel

RtUnlockProcess

IntervalZero.com | Support | Give Feedback